package cz.schovjan.proj.dto;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.annotation.DateTimeFormat.ISO;

/**
 * Trida reprezentuje koncert (vystoupeni).
 * @author schovjan
 *
 */
public class Concert implements Serializable {

	private static final long serialVersionUID = 1L;
	
	private int id;
	
	@NotBlank(message="Místo nesmí být prázdné.")
	@Size(max=100, message="Místo má max. 100 znaků.")
	private String place;
	
	@DateTimeFormat(iso=ISO.DATE)
	private Date dateTime;
	
	@Size(max=100, message="Popis má max. 100 znaků.")
	private String description;

	private List<Band> bands;
	
	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getPlace() {
		return place;
	}

	public void setPlace(String place) {
		this.place = place;
	}

	public Date getDateTime() {
		return dateTime;
	}

	public void setDateTime(Date dateTime) {
		this.dateTime = dateTime;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	
	public List<Band> getBands() {
		return bands;
	}
	
	public void setBands(List<Band> bands) {
		this.bands = bands;
	}

	@Override
	public String toString() {
		return "Concert [id=" + id + ", place=" + place + ", dateTime="
				+ dateTime + ", description=" + description + "]";
	}

}
